<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    
		var str = "spring";
		console.log(rev(str));
		// 定义rev(char)函数
		function rev(char) {
			var arr = char.split("");
			arr.reverse();
			char = arr.join("");
			return char;
		}
		// 连续打点调用方法
		function rev(char) {

			char = char.split("").reverse().join("");
			// 输出
			return char;
		}
  </script>
</head>
<body>
  
</body>
</html>